<?php
namespace Modules\Backstage\Controllers;

class ConfigController extends \Phalcon\Mvc\Controller {
	public function initialize() {
		$this -> response -> setStatusCode(200, 'OK') -> sendHeaders() -> setContentType('application/json', 'UTF-8');
	}

	public function indexAction() {
		$config = [];
		$config['common_status'] = [0=>'可用',1=>'不可用'];
		$config['shop_is_shelf'] = [1=>'上架',2=>'下架'];
		$config['default_image'] = 'http://iph.href.lu/100x100?text=%E6%97%A0%E5%9B%BE%E7%89%87';
		$config['trade_buy_status'] = [0 => '等候匹配',1=>'匹配成功',2=>'打款中',3=>'确认收款中',4=>'未收到款',5=>'冻结订单',6=>'完成匹配',7=>'取消订单'];
		$config['trade_sell_status'] = [0 => '等候匹配',1=>'匹配成功',2=>'打款中',3=>'确认收款中',4=>'未收到款',5=>'冻结订单',6=>'完成匹配',7=>'取消订单'];
		$config['user_status'] = [0=>'正常',1=>'待激活',2=>'冻结',3=>'封号'];
		$config['user_level'] = [1=>'商户',2=>'VIP商户',3=>'加盟商',4=>'代理商'];
		$config['user_wallet_type'] = [1=>'零售积分',2=>'业务积分',3=>'商城积分',4=>'交易票',5=>'开户票'];
		$config['backstage_account_status'] = [0=>'正常',3=>'禁止'];
		$config['user_order_status'] = [0=>'未定义',1=>'下单',3=>'未付款',5=>'已付款',9=>'已发货',13=>'',17=>'确认收货',21=>'完成订单',27=>'关闭订单'];
		$config['user_message_status'] = [0=>'未定义',1=>'未回复',9=>'已回复'];
		$config['notice_is_home'] = [0=>'否',1=>'是'];
		return $this -> response -> setJsonContent(['code'=>0,'msg'=>'获取成功','config'=>$config]);
	}
}